package com.tvunetworks.center.user.service;

import com.tvunetworks.center.common.model.LoginUser;
import com.tvunetworks.center.common.util.Result;
import com.tvunetworks.center.user.model.BookMarkList;
import com.tvunetworks.center.user.model.QueryUserListParam;
import com.tvunetworks.center.user.model.UserBookmark;
import com.tvunetworks.center.user.model.vo.AlreadyShareSonListVo;
import com.tvunetworks.center.user.model.vo.UpdateBookMarkShareParam;
import com.tvunetworks.center.user.model.vo.UserBookmarkVo;

import java.util.List;
/**
 * @program:
 * @description:
 * @author HenryChen
 * @create: 5/29/2019 1:05 PM
 **/
public interface UserBookmarkService {
    /**
     *
     * @param userId userId
     * @param bookmarkIds bookmarkIds
     * @return List
     */
    List<String> getAllChildBookmarkIds(String userId, String bookmarkIds);

    /**
     *
     * @param userId userId
     * @return List
     */
    List<UserBookmarkVo> getAllChildBookmarkTree(String userId);

    /**
     *
     * @param userId userId
     * @param loginUser loginUser
     * @return BookMarkList
     */
    BookMarkList getAllChildBookmarkTreeAndShare(String userId, LoginUser loginUser);

    /**
     *
     * @param userId userId
     * @param bookmarkId bookmarkId
     * @return List
     */
    List<UserBookmarkVo> getAllParentBookmarkTree(String userId,String bookmarkId);

    /**
     *
     * @param userId userId
     * @param parentId parentId
     * @param name name
     * @return int
     */
    int createBookmark(String userId, String parentId, String name);

    /**
     *
     * @param id id
     * @param name name
     * @return int
     */
    int updateBookmark(String id, String name);

    /**
     *
     * @param id id
     * @return int
     */
    int deleteBookmark(String id);

    /**
     *
     * @param bookmarkId bookmarkId
     * @return UserBookmark
     */
    UserBookmark getById(String bookmarkId);

    /**
     *
     * @param userId userId
     */
    void deleteUserAllBookmark(String userId);

    /**
     *
     * @param loginUser loginUser
     * @param queryUserListParam queryUserListParam
     * @return Result
     * @throws Exception 编译
     */
   //根据父账号查询所属子账号
     Result<Object> getUserListByParentUserId(LoginUser loginUser, QueryUserListParam queryUserListParam) throws Exception;

    /**
     *
     * @param loginUser loginUser
     * @param updateBookMarkShareParam updateBookMarkShareParam
     * @return Result
     * @throws Exception 编译
     */
    //父账号分享bookMark给子账号
     Result<Object> updateBookMarkShareParam(LoginUser loginUser, UpdateBookMarkShareParam updateBookMarkShareParam) throws Exception;

    /**
     *
     * @param loginUser loginUser
     * @return List
     * @throws Exception 编译
     */
    //获得父账号已经分享的子账号集合
    List<AlreadyShareSonListVo> getAlreadyShareSonList(LoginUser loginUser) throws Exception;


    /**
     *
     * @param userId userId
     * @param search search
     * @param pageNum pageNum
     * @param pageSize pageSize
     * @return Result
     * @throws Exception 编译
     */
    //获得父账号还没分享的子账号集合
     Result<Object> getNoShareUserListByParentUserId(String userId,String search,Integer pageNum,Integer pageSize) throws Exception;
}
